-
Notifications
You must be signed in to change notification settings - Fork 751
refactor(ziputil): remove non-zipping related utilities out of ZipUtil
#6830
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
/runIntegrationTests |
|
Integ tests failed for unrelated flaky tests. :( |
ZipUtil. (WIP)ZipUtil
|
|
||
| export const readonlyDocument = new ReadonlyDocument() | ||
|
|
||
| export async function getTextContent(uri: vscode.Uri) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it blows my mind we didn't have this already 😆
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, its pretty small so its possible/likely something similar is inlined in a few places.
| assert.deepStrictEqual(getWorkspacePaths(), [workspaceFolder]) | ||
| }) | ||
|
|
||
| it('Should return the correct project path for unit test generation', function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can probably dropunit test generation, i'm guessing that was just leftover from the zipUtil test
| import { getWorkspaceForFile, getWorkspacePaths } from '../../../shared/utilities/workspaceUtils' | ||
| import { getTestWorkspaceFolder } from '../../../testInteg/integrationTestsUtilities' | ||
|
|
||
| describe('getWorkspace utilities', function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was this test file intentionally placed in amazonq/util/ instead of shared/utilities/ ?
Problem
ZipUtilcontains a mix of different utilities from working with workspaces, to computing git diffs. These are all used in zipping the project, but inherently have no connection to it.Larger problem is that
ZipUtilis highly coupled to agent implementations and is difficult to generalize. Moving out non-zipping noise will help.Solution
GitDiffutilities out of theZipUtilclass. These functions have no test coverage and are therefore unsafe to export or move to their own file in its current state.Future Work
Refactor to avoid references to scope and use case.
feature/xbranches will not be squash-merged at release time.